﻿using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization.Infrastructure;

namespace Simple.CMS.Web.Authorization
{
    public class AdministratorsAuthorizationHandler: AuthorizationHandler<AuthorizationRequirement>
    {
        protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, AuthorizationRequirement requirement)
        {
            //throw new NotImplementedException();
            if (context.User == null)
            {
                return Task.FromResult(0);
            }
            return Task.FromResult(0);
        }
    }
}
